package com.example.demo.design.demo08_factoryMethod;

/**
 * Created by 蔡超 on 2018/10/2.
 */
public class Client {
    public static void main(String[] args) {
        LeifengFactory leifengFactory = new StudentFactory();
        Leifeng leifeng = leifengFactory.createLeifeng();
        leifeng.wash();

        LeifengFactory leifengFactory1 = new VolunteerFactory();
        Leifeng volunteer = leifengFactory1.createLeifeng();
        volunteer.buyRice();

    }
}
